<?php
namespace app\api\controller;

use think\Controller;
use think\Db;

class Checkcount extends Controller
{
    public function checkCountIndex($ip,$count_url){
        if($this->request->isPost()){
            $data = $this->request->post();
            //检测ip通过关键词进来的次数
            $checkCount = checkKeywordCount($data['ip']);
            $zip = preg_replace('/\./','-',$data['ip']);
            if($checkCount['status'] == 1){
                $strTips = '提示:<br />域名:'.$data['count_url'].'<br />IP:'.$zip.'刷广告';
                // unifiedSendMsg($strTips);
                unifiedSendMail($strTips,'2221691750@qq.com');
                exit;
            }
        }
        return '错误';
    }
	
	public function testSendEmail(){
		$strTips = '测试';
		unifiedSendMail($strTips,'shning123@qq.com');
	}
}